<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <center>
            <h1>Artigo</h1>
            <form name="buscarArtigo" method="post" action="/Esquina_da_TI/Gui/ExibirArtigosPublicados.php">
                <table  cellspacing="1" cellpadding="1">
                    <tr>
                        <td Class="head" colspan="2">Filtrar</td>
                    </tr>
                    <tr>
                        <th>Assunto</th>
                        <td>
                            <select name="assuntoArtigo" id="assuntoArtigo">
                                <option value="0">Escolha o Assunto</option>
                                <?php
                                require_once($_SERVER["DOCUMENT_ROOT"] . '/Esquina_da_TI/DAO/Conexao.php');

                                $conexao = new Conexao();

                                $conexao->abrirConexao();

                                $assunto = $_POST['assunto'];

                                $sql = "SELECT * FROM assunto_artigo";
                                $qr = mysql_query($sql) or die(mysql_error());

                                while(
                                $ln = mysql_fetch_assoc($qr)) {
                                    echo '<option value="'.$ln['codAssunto'].'">'.$ln['nome'].'</option>';
                                }

                                $conexao->fecharConexao();

                                ?>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td><input type="submit" name="filtrar" value="Mostrar Resultados"></td>
                    </tr>
                    <tr>
                    <td></td></tr>
                </table>
            </form>
        </center>
    </body>
</html>